//
//  Node.hpp
//  RoutingEvaluator
//
//  Created by Christopher Kemsley on 4/15/12.
//  Copyright (c) 2012 iAppolopolis. All rights reserved.
//

#include <vector>
#import "Object.hpp"
#import "NodeInfo.hpp"

NamespaceBegin

class	Link ;

class	Node ;
class	NodeSet ;




class	Node : public Object
{
public:
	
	static Node*	createNode	( NodeInfo * identity ) ;
	
	
	NodeInfo*const				identity ;
	
	std::vector<Link*> const&	links () ;
	
	
private:
	friend class NodeSet ;
	Node ( NodeInfo * identity ) ;
	
protected:
	friend class Link ;
	std::vector<Link*>	mLinks ;
} ;



class	NodeSet : public Object
{
public:
	static NodeSet*		createSetWithNodes	( NodeInfoSet * set ) ;
	
	
	Node*	nodeWithNodeInfo	( NodeInfo * info ) ;
	Node*	nodeWithIdentifier	( Identifier const & identifier ) ;
	
	
	std::vector<Node*> const&	nodes () ;
	
	
private:
	std::vector<Node*>	mNodes ;
	
	NodeSet ( NodeInfoSet * set ) ;
} ;




NamespaceEnd
